import router from './router'
import store from '@/store'


router.beforeEach(async(to, from, next) => {
  await store.dispatch('user/setUserInfo', {
    // token: to.query.token
    token: to.query.token || 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTcwODU4NDk4MiwianRpIjoiOTkyMWMwOWItM2ZmYy00NjNlLWE2MmQtNGViMmU4N2ZmZmNmIiwidHlwZSI6Miwic3ViIjo0NjMzNzg2ODYyMjQ0NTQsIm5iZiI6MTcwODU4NDk4MiwiZXhwIjoxNzExMTc2OTgyfQ.8AbjPzrWzY1vZVq9logVKMufcRCjeDYZ8FIf7xsilIA'
  })
  next()
})

router.afterEach(() => {
})
